//
//  GZplayArrayTVcell.m
//  B段项目
//
//  Created by 高哲 on 15/11/5.
//  Copyright © 2015年 谢美娜. All rights reserved.
//

#import "GZplayArrayTVcell.h"
#import "Header.h"
@implementation GZplayArrayTVcell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _titleLable = [[myTitleLabel alloc] init];
        [self.contentView addSubview:_titleLable];
        
        _authorLable = [[UILabel alloc] init];
        _authorLable.textColor = [UIColor lightGrayColor];
        _authorLable.textAlignment = NSTextAlignmentLeft;
        _authorLable.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_authorLable];
        
        _playIconImageview = [[UIImageView alloc] init];
        _playIconImageview.image = [UIImage imageNamed:@"GZplay.png"];
        [self.contentView addSubview:_playIconImageview];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _titleLable.frame = CGRectMake(20 * FitWidth, 15 * FitHeight, 280 * FitWidth, 25 * FitHeight);
    _authorLable.frame = CGRectMake(_titleLable.frame.origin.x, _titleLable.frame.size.height + _titleLable.frame.origin.y, 140 * FitWidth, 15 * FitHeight);
    _playIconImageview.frame = CGRectMake(_titleLable.frame.size.width + _titleLable.frame.origin.x + 30 * FitWidth, self.contentView.frame.size.height / 2 - 13 * FitHeight, 26 * FitWidth, 26 * FitWidth);
    
}

- (void)setRadioModel:(GZ_RadioModel *)radioModel
{
    _titleLable.text = radioModel.title;
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
